import uvicorn,os
from application import create_app,FastAPI

app:FastAPI = create_app()

# @app.get('/api')
# async def api()->dict:
#     """
#     测试接口
#     :return:
#     """
#     return {'title':'api测试接口'}

if __name__ == '__main__':
    uvicorn.run(
        'main:app',
        host=os.environ.get('APP_HOST','0.0.0.0'),
        port=int(os.environ.get('APP_PORT',8000)),
        reload=True
    )